package talk.Net;


import io.reactivex.Observable;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.POST;

/**
 * Created by debby on 2018/3/27.
 * 描述:网络请求接口
 */

public interface ApisService {


    @POST(Apis.IM_URL + Apis.Token)
    @FormUrlEncoded
    Observable<String> getToken(
            @Field("userId") String userId,
            @Field("name") String name,
            @Field("portraitUri") String portraitUri);

    @FormUrlEncoded
    @POST(Apis.LoginApi)
    Observable<String> login(
            @Field("une") String name,
            @Field("upassword") String password);


    @FormUrlEncoded
    @POST(Apis.AddFriendApi)
    Observable<String> addFriend(
            @Field("fid1") String name,
            @Field("fid2") String password);

    @FormUrlEncoded
    @POST(Apis.RegisterApi)
    Observable<String> register(
            @Field("uname") String name,
            @Field("upassword") String password,
            @Field("email") String email,
            @Field("imgurl") String imgurl);

    @FormUrlEncoded
    @POST(Apis.showUserApi)
    Observable<String> findUser(
            @Field("une") String id);

}
